package com.itheima.test03;
/*
需求：

1. 定义一个类，在类中定义一个成员方法 show ，方法功能是：打印一个字符串。
2. 使用反射机制创建该类的对象，并调用该对象的 show 方法。
 */
public class Person {
    private String id;
    private String name;
    private int age;
    private double salary;

    public void show(){
        System.out.println(age + "岁、工作编号为" + id + "的" + name + "薪资为" + salary + "元");
    }

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", salar=" + salary +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public Person(String id, String name, int age, double salary) {

        this.id = id;
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public Person() {

    }
}
